home *** CD-ROM | disk | FTP | other *** search
/ PC World 2007 December / PCWorld_2007-12_cd.bin / v cisle / htttrack / httrack-3.41-3.exe / {app} / src / htsback.h < prev    next >
C/C++ Source or Header  |  2006-10-15  |  5KB  |  135 lines

  1. /* ------------------------------------------------------------ */
  2. /*
  3. HTTrack Website Copier, Offline Browser for Windows and Unix
  4. Copyright (C) Xavier Roche and other contributors
  5.  
  6. This program is free software; you can redistribute it and/or
  7. modify it under the terms of the GNU General Public License
  8. as published by the Free Software Foundation; either version 2
  9. of the License, or any later version.
  10.  
  11. This program is distributed in the hope that it will be useful,
  12. but WITHOUT ANY WARRANTY; without even the implied warranty of
  13. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  14. GNU General Public License for more details.
  15.  
  16. You should have received a copy of the GNU General Public License
  17. along with this program; if not, write to the Free Software
  18. Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
  19.  
  20.  
  21. Important notes:
  22.  
  23. - We hereby ask people using this source NOT to use it in purpose of grabbing
  24. emails addresses, or collecting any other private information on persons.
  25. This would disgrace our work, and spoil the many hours we spent on it.
  26.  
  27.  
  28. Please visit our Website: http://www.httrack.com
  29. */
  30.  
  31. /* ------------------------------------------------------------ */
  32. /* File: httrack.c subroutines:                                 */
  33. /*       backing system (multiple socket download)              */
  34. /* Author: Xavier Roche                                         */
  35. /* ------------------------------------------------------------ */
  36.  
  37.  
  38. #ifndef HTSBACK_DEFH
  39. #define HTSBACK_DEFH 
  40.  
  41. #include "htsglobal.h"
  42.  
  43. #if HTS_XGETHOST
  44. #if USE_BEGINTHREAD
  45. #include "htsthread.h"
  46. #endif
  47. #endif
  48.  
  49. /* Forward definitions */
  50. #ifndef HTS_DEF_FWSTRUCT_httrackp
  51. #define HTS_DEF_FWSTRUCT_httrackp
  52. typedef struct httrackp httrackp;
  53. #endif
  54. #ifndef HTS_DEF_FWSTRUCT_struct_back
  55. #define HTS_DEF_FWSTRUCT_struct_back
  56. typedef struct struct_back struct_back;
  57. #endif
  58. #ifndef HTS_DEF_FWSTRUCT_cache_back
  59. #define HTS_DEF_FWSTRUCT_cache_back
  60. typedef struct cache_back cache_back;
  61. #endif
  62. #ifndef HTS_DEF_FWSTRUCT_lien_back
  63. #define HTS_DEF_FWSTRUCT_lien_back
  64. typedef struct lien_back lien_back;
  65. #endif
  66. #ifndef HTS_DEF_FWSTRUCT_htsblk
  67. #define HTS_DEF_FWSTRUCT_htsblk
  68. typedef struct htsblk htsblk;
  69. #endif
  70.  
  71. /* Library internal definictions */
  72. #ifdef HTS_INTERNAL_BYTECODE
  73.  
  74. // create/destroy
  75. struct_back* back_new(int back_max);
  76. void back_free(struct_back** sback);
  77.  
  78. // backing
  79. #define BACK_ADD_TEST "(dummy)"
  80. #define BACK_ADD_TEST2 "(dummy2)"
  81. int  back_index(httrackp* opt, struct_back* sback,char* adr,char* fil,char* sav);
  82. int back_available(struct_back* sback);
  83. LLint back_incache(struct_back* sback);
  84. int back_done_incache(struct_back* sback);
  85. HTS_INLINE int  back_exist(struct_back* sback,httrackp* opt,char* adr,char* fil,char* sav);
  86. int  back_nsoc(struct_back* sback);
  87. int  back_nsoc_overall(struct_back* sback);
  88. int  back_add(struct_back* sback,httrackp* opt,cache_back* cache,char* adr,char* fil,char* save,char* referer_adr,char* referer_fil,int test);
  89. int  back_add_if_not_exists(struct_back* sback,httrackp* opt,cache_back* cache,char* adr,char* fil,char* save,char* referer_adr,char* referer_fil,int test);
  90. int  back_stack_available(struct_back* sback);
  91. int  back_search(httrackp* opt, struct_back* sback);
  92. int  back_search_quick(struct_back* sback);
  93. void back_clean(httrackp* opt,cache_back* cache,struct_back* sback);
  94. int  back_cleanup_background(httrackp* opt,cache_back* cache,struct_back* sback);
  95. void back_wait(struct_back* sback,httrackp* opt,cache_back* cache,TStamp stat_timestart);
  96. int  back_letlive(httrackp* opt, cache_back* cache, struct_back* sback, int p);
  97. int  back_searchlive(httrackp* opt, struct_back* sback, char* search_addr);
  98. void back_connxfr(htsblk* src, htsblk* dst);
  99. void back_move(lien_back* src, lien_back* dst);
  100. void back_copy_static(const lien_back* src, lien_back* dst);
  101. int back_serialize(FILE *fp, const lien_back* src);
  102. int back_unserialize(FILE *fp, lien_back** dst);
  103. void back_set_finished(struct_back* sback, int p);
  104. void back_set_locked(struct_back* sback, int p);
  105. void back_set_unlocked(struct_back* sback, int p);
  106. int  back_delete(httrackp* opt,cache_back* cache,struct_back* sback,int p);
  107. void back_index_unlock(struct_back* sback, int p);
  108. int  back_clear_entry(lien_back* back);
  109. int  back_flush_output(httrackp* opt, cache_back* cache, struct_back* sback, int p);
  110. void back_delete_all(httrackp* opt, cache_back* cache, struct_back* sback);
  111. int  back_maydelete(httrackp* opt, cache_back* cache, struct_back* sback, int p);
  112. void back_maydeletehttp(httrackp* opt, cache_back* cache, struct_back* sback, int p);
  113. int  back_trylive(httrackp* opt,cache_back* cache,struct_back* sback, int p);
  114. int  back_finalize(httrackp* opt,cache_back* cache,struct_back* sback,int p);
  115. void back_info(struct_back* sback,int i,int j,FILE* fp);
  116. void back_infostr(struct_back* sback,int i,int j,char* s);
  117. LLint back_transfered(LLint add,struct_back* sback);
  118. // hostback
  119. #if HTS_XGETHOST
  120. void back_solve(httrackp *opt,lien_back* sback);
  121. int host_wait(httrackp *opt, lien_back* sback);
  122. #endif
  123. int back_checksize(httrackp* opt,lien_back* eback,int check_only_totalsize);
  124. int back_checkmirror(httrackp* opt);
  125.  
  126. #if HTS_XGETHOST
  127. #if USE_BEGINTHREAD
  128. void Hostlookup(void* iadr_p);
  129. #endif
  130. #endif
  131.  
  132. #endif
  133.  
  134. #endif
  135.